//
//  ViewController.m
//  simple app
//
//  Created by iD Student on 6/25/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController
@synthesize infoLabel;
@synthesize inceaseButton;
@synthesize deceaseButton;

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    [infoLabel setText:@""];
    num=0;


}

- (void)viewDidUnload
{
    [self setInfoLabel:nil];
    [self setInceaseButton:nil];
    [self setDeceaseButton:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    } else {
        return YES;
    }
}

- (IBAction)increase:(id)sender {
    num++;
    [infoLabel setText:[NSString stringWithFormat:@"%i",num]];
}

- (IBAction)decrease:(id)sender {
    num--;
    [infoLabel setText:[NSString stringWithFormat:@"%i",num]];
}
@end
